New Paypal Page

Hi all,
I 'll like to have a paypal link from the image.php opening to a new page.
I use the custom data off the image in order to control different price so i put this code
in image.php

`$prices = getImageCustomData();

if ($prices == "")

echo "";

else {

">Buy a picture

}`

My problem is that i want to replace the getFullImageURL fonction by a new php file (buy.php for example). In this file i would display the picture and some text. All this file shoud be theming by the CSS files.

Hope you understand me.
Regards
Laurent

Comments

  • Sounds like a plan. Did you expect us to write the code for you?

    `$prices = getImageCustomData();

    if (!empty($prices))

    echo 'name.'&image='.$_zp_current_image->filename>">Buy a picture';

    }`

    will get you to your custom buy.php page where you can display the image, etc.
  • Hi,
    Not sure i really understand the meaning of :"Sounds like a plan" even with google translate.
    All i want is some help to paste the picture in a another php file. You gave me the full solution, I really appreciate.
    I open a paypal account (i have to validate my credit card). I'll will give you some donation. You make a good work and for me is the unique way to thank you.
    I 'll write another post when the wired transfet will be effective.

    Regards
    Laurent
  • I"m late, come back from holiday...
    I just made a donation.
    thank a lot

    Laurent
  • acrylian Administrator, Developer
    Thanks a lot!
  • Ouch !!,
    I upgrade my site to 1.2 version and paypal doesn't work anymore !
    So I rool-back to 1.18 and it's work again.
    Did you change something in the paypal system ?

    I think that the problems come from
    `<?php printBuySizedImage(getImageTitle()); ?>` i put in my buy php file.

    Regards
    Laurent
  • There are no siginificant changes in the paypal plugin between 1.1.7 and 1.2. (Not sure what 1.18 is.)
  • Oh,
    How i can you explain that it's work when i put the old script back ?

    It's maybe a typo mistake in the function, but i don't find where the function is at this time.

    Laurent
  • I found :

    In the 1.2 [2213] there are no more printBuySizedImage function in the template-function.php.
    So i paste the from the 1.18 version and it's now.

    Is there a reason that this function as gone or it is just a mistake ?

    Regards
    Laurent
  • What are you trying to pull on us? First there is no such thing as zenphoto 1.18. second, the zenPaypal plugin which was introduced in zenphoto 1.1.6 has never had a function named `printBuySizedImage ()`
  • Wow, relax.
    I just report some factual thing, but you are right, i made a mistake the previous was this one : version 1.1.7 [1842], sorry.
    2nd : I'm not a php coder, you gave me the code of one function (look at your second answer) so when i saw this function :

    `
    function printBuySizedImage($alt, $class=NULL, $id=NULL) {
    global $_zp_flash_player;
    //Print videos
    if(getImageVideo()) {
    $ext = strtolower(strrchr(getUnprotectedImageURL(), "."));
    if (($ext == ".flv") || ($ext == ".mp3") || ($ext == ".mp4")) {
    //Player Embed...
    if (is_null($_zp_flash_player)) {
    echo "image";
    } else {
    $_zp_flash_player->playerConfig($imagepath,$image['title']);
    }
    }
    elseif ($ext == ".3gp") {
    echo '






    ';
    }
    elseif ($ext == ".mov") {
    echo '







    ';
    }
    }
    `
    I wonder how i can write it !!! for me it's impossible!

    But i most important is that the script works fine

    Regards
    Laurent
  • acrylian Administrator, Developer
    The code you posted is actually a function called ' getDefaultSizedImage()`. Not sure what that should do in the paypal plugin at all... Maybe something got mangled on update.
  • Do not worry about that.
    The important thing is that it works.

    Best regards
    Laurent
Sign In or Register to comment.